# This dockerfile uses the CentOS image

FROM python:3.7-alpine3.8

MAINTAINER miaoheng

WORKDIR /home

COPY . /home/gpceth
RUN echo -e http://mirrors.ustc.edu.cn/alpine/v3.7/main/ > /etc/apk/repositories
RUN apk update && apk add \
    mariadb-dev \
    gcc \
    make \
    openldap-dev \
    python-dev \
    musl-dev \
    linux-headers \
    libzmq \
    zeromq-dev \
    subversion \
    tzdata && \
    pip install -r /home/gpceth/req.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

CMD ["mkdir","/static"]
VOLUME ["/static"]
CMD ["/usr/local/bin/uwsgi", "--ini", "/home/gpceth/uwsgi.ini"]
